home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20041116-20060924 / 000360_toastyboy@googlemail.com_Tue Jun 20 10:33:25 2006.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Path: newsmaster.cc.columbia.edu!panix!bloom-beacon.mit.edu!4.24.21.218.MISMATCH!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!r2g2000cwb.googlegroups.com!not-for-mail
  2. From: toastyboy@googlemail.com
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Assigning output from LINEOUT to a variable
  5. Date: 20 Jun 2006 06:54:04 -0700
  6. Organization: http://groups.google.com
  7. Lines: 57
  8. Message-ID: <1150811644.629253.47720@r2g2000cwb.googlegroups.com>
  9. NNTP-Posting-Host: 64.69.191.231
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset="iso-8859-1"
  12. X-Trace: posting.google.com 1150811649 28426 127.0.0.1 (20 Jun 2006 13:54:09 GMT)
  13. X-Complaints-To: groups-abuse@google.com
  14. NNTP-Posting-Date: Tue, 20 Jun 2006 13:54:09 +0000 (UTC)
  15. User-Agent: G2/0.2
  16. X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
  17. X-HTTP-Via: 1.0 TROW-ISA1
  18. Complaints-To: groups-abuse@google.com
  19. Injection-Info: r2g2000cwb.googlegroups.com; posting-host=64.69.191.231;
  20.    posting-account=9CvZkQ0AAABEiymyFVJPVVB65tz-PEMS
  21. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15617
  22.  
  23. Hi,
  24.  
  25. I'm using kermit to control a quasar electronics 3108 serial module, at
  26. present I am calling the kermit script i have written from a bash shell
  27. script and it works ok, but it is inefficient.
  28.  
  29. I'm hoping to write the whole thing inside a kermit script, however I'm
  30. stuck....
  31.  
  32. I can read in a file and then assign the value contained in that file
  33. to a variable that works a treat!  See below:
  34.  
  35.  
  36. OPEN READ /u01/status/OUT58
  37. READ \%a
  38. close read-file
  39.  
  40. if ( == \%a 0 ) {
  41.         LINEOUT F1
  42.         INPUT 5 \"#\"
  43. } else {
  44.         LINEOUT N1
  45.         INPUT 5 \"#\"
  46. }
  47.  
  48.  
  49.  
  50.  
  51. As I say that works well, however I need to be able to do (say)
  52.  
  53. LINEOUT I1
  54.  
  55. which will give me the status of input line 1 and then take the output
  56. of this and if it is 1 then do something, if it is 0 then do something
  57. else.
  58.  
  59. So I need something like:
  60.  
  61. LINEOUT I1   > \%a
  62. INPUT 5 \"#\"
  63. if ( == \%a 0 ) {
  64.         echo 1 > IN11
  65. } else {
  66.         echo 0 > IN11
  67. }
  68.  
  69.  
  70. ...but I've just made up the syntax of the fist line "LINEOUT I1   >
  71. \%a"  I need to know how to inject the output of this command to a
  72. variable.
  73.  
  74.  
  75. I hope that makes sense.
  76.  
  77. Thanks
  78. -Dan
  79.